package personal.domain.accounting;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table (name="monthwise_calendar")
@NamedQueries({
	@NamedQuery(name=MonthwiseCalendar.MONTHWISE_CAL_GET_ALL_FOR_YEAR, query="select cal from MonthwiseCalendar cal where cal.year=:year order by cal.month asc"),
	@NamedQuery(name=MonthwiseCalendar.MONTHWISE_CAL_GET_FOR_MONTH, query="select cal from MonthwiseCalendar cal where cal.year=:year and cal.month=:month")
})
public class MonthwiseCalendar implements Serializable {
	private static final long serialVersionUID = 1L;
	public static final String MONTHWISE_CAL_GET_ALL_FOR_YEAR = "MonthwiseCalendar.getAllForYear";
	public static final String MONTHWISE_CAL_GET_FOR_MONTH = "MonthwiseCalendar.getForMonth";
	private Long calendarId;
	private Long year;
	private Long month;
	
	@Id
	@GeneratedValue (strategy=GenerationType.AUTO)
	@Column (name="calendar_id", unique=true, length=11, nullable=false, insertable=true, updatable=false)
	public Long getCalendarId() {
		return calendarId;
	}
	public void setCalendarId(Long calendarId) {
		this.calendarId = calendarId;
	}
	@Column (name="year", unique=false, length=4, nullable=false, insertable=true, updatable=true)
	public Long getYear() {
		return year;
	}
	public void setYear(Long year) {
		this.year = year;
	}
	@Column (name="month", unique=false, length=2, nullable=false, insertable=true, updatable=true)
	public Long getMonth() {
		return month;
	}
	public void setMonth(Long month) {
		this.month = month;
	}
}
